package Chapter04;

public class ContinueAndBreakTest {
	public static void main(String[] args) {

		int sum = 0;

		int i = 1;
		while (i < 1000) {
			     i++;
			if (sum > 5000)
				break;

			if (i % 3 != 0)
				continue;

			sum += i;
		}

		System.out.println(sum);
	}
}